﻿namespace Ewk.Math.Algebra.UnitTests.MatrixTests.DoubleTests
{
    public class DoubleTestBase : MatrixUnitTestsBase<double>
    {
        const int M = 3;

        private int _rowCount = M;
        private int _columnCount = M;

        protected int RowCount
        {
            get { return _rowCount; }
            set { _rowCount = value; }
        }

        protected int ColumnCount
        {
            get { return _columnCount; }
            set { _columnCount = value; }
        }

        /// <summary>
        ///     1   2   3
        ///     ---------
        /// 1 | 1   2   3
        /// 2 | 2   4   6
        /// 3 | 3   6   9
        /// </summary>
        protected Matrix<double> Matrix
        {
            get
            {
                return CreateMatrix(RowCount, ColumnCount, (i, j) => (i + 1) * (j + 1));
            }
        }

        /// <summary>
        ///     1   2   3
        ///     ---------
        /// 1 | 1   0   0
        /// 2 | 0   1   0
        /// 3 | 0   0   1
        /// </summary>
        protected Matrix<double> Identity
        {
            get
            {
                return Matrix<double>.Identity(RowCount);
            }
        }
    }
}